package com.yscp.ysdemo.dto;

import com.yscp.ysdemo.entity.User;
import com.yscp.ysdemo.entity.UserExtend;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class UserDetail extends UserExtend {

    private Long userId;

    private String username;

    private String password;

    private Integer status;

    private Integer type;

    private Date createTime;

    private String headerBase64;

    public User getUser(){
        User user = new User();
        user.setUserId(getUserId());
        user.setUsername(getUsername());
        user.setStatus(getStatus());
        user.setType(getType());
        user.setCreateTime(getCreateTime());
        user.setHeaderBase64(getHeaderBase64());
        return user;
    }

    public UserExtend getUserExtend(){
        UserExtend userExtend = new UserExtend();
        userExtend.setDescription(getDescription());
        userExtend.setUserId(getUserId());
        userExtend.setSex(getSex());
        userExtend.setMoney(getMoney());
        userExtend.setLevel(getLevel());
        userExtend.setCommentedMsgCount(getCommentedMsgCount());
        userExtend.setSysmMsgCount(getSysmMsgCount());
        userExtend.setLikeMsgCount(getLikeMsgCount());
        userExtend.setLikeCount(getLikeCount());
        return userExtend;
    }


}
